﻿package fj.ui
{
	import flash.display.MovieClip;
	
	public class FJImageTransformUI extends MovieClip
	{
		private var _width:Number;
		private var _height:Number;
		private var _colorLine:uint = 0x000000;
		private var _colorFill:uint = 0xFFFFFF;
		
		public function FJImageTransformUI():void
		{
			graphics.lineStyle(1,_colorLine);
			graphics.drawRect(-100,-100,200,200);
			graphics.beginFill(_colorFill);
			graphics.drawRect(-105,-105,10,10);
			graphics.drawRect(105,-105,10,10);
			graphics.drawRect(105,105,10,10);
			graphics.drawRect(-105,105,10,10);
			graphics.drawRect(0,0,7,7);
		}
		public function adjust( w:Number, h:Number ):void
		{
			graphics.clear();
			graphics.lineStyle(1,_colorLine);
			graphics.drawRect(-w/2,-h/2,w,h);
			graphics.beginFill(_colorFill);
			graphics.drawRect(-w/2-5,-h/2-5,10,10);
			graphics.drawRect(w/2-5,-h/2-5,10,10);
			graphics.drawRect(w/2-5,h/2-5,10,10);
			graphics.drawRect(-w/2-5,h/2-5,10,10);
			graphics.drawRect(0,0,7,7);
		}
	}
}